<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/28
 * Time: 14:16
 */
namespace app\api\controller;
use app\api\controller\AuthBase;

class Logout extends AuthBase{
    public function index()
    {
        //删除redis缓存
        $res = cache(config("redis.token_par").$this->accessToken,NULL);
        if($res){
            return show(config("status.success"),'退出登录成功');
        }
        return show(config('status.error'),'退出登录失败');
    }
}